package com.sdry.system.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sdry.system.entity.SysDept;
import com.sdry.system.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @program: info_sdry
 * @description: 部门
 * @author: cb
 * @create: 2020-02-17 14:05
 **/
@Service
@Transactional(rollbackFor = Exception.class)
public class DeptServiceImpl extends ServiceImpl<DeptMapper, SysDept> implements DeptService {

    @Autowired
    private DeptMapper deptMapper;

    @Override
    public boolean deleteDept(Long deptId) {
        Integer effect = deptMapper.deleteDept(deptId);
        if (effect > 0) {
            return true;
        }
        return false;
    }
}
